// 样式
body {
    width: 100%;
    height: 100vh;
    background: #f1ede5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wrap {
    width: 1340px;
    height: 800px;
    display: grid;
    grid-template-rows: 100px 1fr;
    background-color: #fff;
    border-radius: 20px;
    overflow: hidden;
    .nav {
        display: flex;
        // width: 100%px;
        align-items: center;
        // justify-content: space-around;
        justify-content: space-between;
        padding: 0 50px;
        .menu {
            .iconfont {
                font-size: 34px;
            }
        }
        .btn {
            font-size: 12px;
            padding: 10px;
            border: 1px solid #e1e1e0;
            border-radius: 5px;
        }
    }
    .content {
        width: 1240px;
        height: 650px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        // overflow: hidden;
        position: relative;//为什么设置相对定位就能解决video的尺寸问题
        .text {
            position: relative;
            left: -600px;
            opacity: 0;
            transition: 0.6s;
            overflow: hidden;
            h1 {
                margin: 10px 0px;
                font-size: 70px;
                line-height: 70px;
            }
            h2 {
                margin-top: 30px;
                font-size: 32px;
                font-weight: 200;
            }
            .more {
                margin-top: 20px;
                text-align: center;
                line-height: 50px;
                border-radius: 10px;
                color: #fff;
                width: 150px;
                height: 50px;
                background-color: #e46036;
            }
            .page {
                margin-top: 80px;
                .iconfont {
                    font-size: 16px;
                }
            }
        }
        .video {
            position: absolute;
            top: 0;
            right: 0;
            overflow: hidden;
            width: 100%;
            height: 100%;
            border-radius: 20px;
            transition: 0.6s;
            .slogan {
                width: 100%;
                margin-top: 80px;
                position: absolute;
                transition: 0.6s;
                left: 0;
                h1 {
                    margin: 10px auto;
                    text-align: center;
                    font-size: 70px;
                    color: #fff;
                    transition: 0.6s;
                }
                .btn {
                    margin: 60px auto;
                    width: 150px;
                    height: 50px;
                    background: #e46036;
                    text-align: center;
                    line-height: 50px;
                    border-radius: 10px;
                    color: #fff;
                    transition: 0.6s;
                }
            }
            video {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }
        img {
            position: absolute;
        }
        .star1 {
            top: 24%;
            left: -45%;
            z-index: 999;
            animation: bounce 3s infinite;
            transition: 0.5s;
        }
        .star2 {
            top: 80%;
            left: -40%;
            z-index: 999;
            transition: 0.5s;
            animation: bounce 3s infinite;
        }
        .star3 {
            top: 50%;
            right: -97%;
            z-index: 999;
            animation: bounce 3s infinite;
            transition: 0.5s;
        }
    }
}


// 动画
.content:hover {
    .text {
        left: 0;
        opacity: 1;
    }
    .video {
        width: 50%;
        .slogan {
            left: -800px;
        }
    }
    .star1 {
        
        left: 45%;
    }
    .star2 {
        left: 40%;
    }
    .star3 {
        right: -3%;
    }
    .text {
        .more:hover {
            background-color: #f0360c;
            cursor: pointer;
        }
    }
}
.nav {
    .menu:hover {
        cursor: pointer;
    }
    .btn:hover {
        background-color: #e46036;
        color: #fff;
        border-color: transparent;
        cursor: pointer;
    }
}
@keyframes bounce {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0);
    }
}